package com.liujit.bms.app.controller;

import com.liujit.bms.app.domain.result.BlogCarouselResult;
import com.liujit.bms.app.properties.AppProperties;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 博客轮播图管理接口
 * @Author liujun
 * @Date 2021-07-13 11:14:42
 */
@RequiredArgsConstructor
@Api(tags = "博客轮播图管理接口")
@RestController
@RequestMapping("/blog/carousel")
@EnableConfigurationProperties(AppProperties.class)
public class BlogCarouselController {

    private final AppProperties appProperties;

    @ApiOperation(value = "列表查询", notes = "查询博客轮播图列表")
    @GetMapping("/getList")
    public List<BlogCarouselResult> getList() {
        return appProperties.getCarousel();
    }
}
